<table class="table gn-results-editor">
  <tr data-ng-repeat="md in searchResults.records">
    <td>
      <input data-gn-selection-md type="checkbox"
             data-ng-model="md['geonet:info'].selected"
             aria-label="{{'clickToSelect' | translate}}"
             data-ng-change="change()"/>
    </td>
    <td>
      <gn-md-type-widget metadata="md"></gn-md-type-widget>
      <gn-md-type-inspire-validation-widget metadata="md" data-ng-if="isInspireEnabled"></gn-md-type-inspire-validation-widget>
    </td>
    <td>
      <div class="row">
        <div class="col-lg-8 col-md-8">
          <div class="clearfix">
            <div class="pull-left">
              <a href=""
                data-ng-show="md.isTemplate != 's'"
                data-ng-href="catalog.search#/{{(md.draft == 'y')?'metadraf':'metadata'}}/{{md.getUuid()}}"
                title="{{md.abstract}}">{{md.title || md.defaultTitle}}</a>
              <span data-ng-show="md.isTemplate == 's'">{{md.title || md.defaultTitle}}</span>
              <div class="gn-record-details text-muted">
                <small><span data-translate="">owner</span>:</small>
                <small>{{::md.getOwnername()}}</small>
                &centerdot;
                <small data-translate="">updatedOn</small>
                <small class="text-muted"
                       data-gn-humanize-time="{{md['geonet:info'].changeDate}}"
                       data-from-now=""></small>

                <span data-ng-if="isMdWorkflowEnable">
                  &centerdot;
                  <small class="text-muted gn-status"
                        data-ng-class="{'text-success': md.mdStatus == 2, 'text-warning': md.mdStatus == 4}"
                        data-ng-if="md.mdStatus < 50 && isMdWorkflowEnable">{{('status-' + md.mdStatus) | translate}}</small>

                  <small class="text-muted gn-status"
                        data-ng-class="text-warning"
                        data-ng-if="!md.mdStatus"
                        data-ng-translate="">{{'status-no-status' | translate}}</small>
                </span>
              </div>
            </div>
          </div>
          <gn-draft-validation-widget data-ng-if="md.draft == 'e'" metadata="md"></gn-draft-validation-widget>
        </div>
        <div class="col-lg-4 col-md-4 gn-nopadding-right">
          <div class="btn-group">
            <a class="btn btn-default"
               data-ng-href=""
               data-ng-if="user.canEditRecord(md) && user.isEditorOrMore() && md.draft != 'y'"
               data-ng-click="mdService.openPrivilegesPanel(md, getCatScope())"
               title="{{'privileges' | translate}}">
              <i class="fa text-muted"
                 data-ng-class="md.isPublished() ? 'fa-unlock' : 'fa-lock'"></i>
            </a>
            <!-- TODO: subtemplate link for editing is different -->
            <a class="btn btn-default"
               data-ng-show="user.canEditRecord(md) && md.isTemplate != 's' && (user.isReviewerOrMore() || md.mdStatus != 4 || !isMdWorkflowEnable)"
               data-ng-href="#/metadata/{{md['geonet:info'].id}}?redirectUrl=catalog.edit"
               title="{{'edit' | translate}}">
              <i class="fa fa-pencil"></i>
            </a>
            <a class="btn btn-default"
               data-ng-show="user.canEditRecord(md) && md.isTemplate != 's' && (user.isReviewerOrMore() || md.mdStatus != 4 || !isMdWorkflowEnable) && md.draft != 'e'"
               data-gn-click-and-spin="deleteRecord(md)"
               data-gn-confirm-click="{{'deleteRecordConfirm' | translate:md}}"
               title="{{'delete' | translate}}">
              <i class="fa fa-trash text-danger"></i>
            </a>
            <a class="btn btn-default"
               data-ng-show="user.canEditRecord(md) && md.isTemplate != 's'"
               data-ng-href="#/create?childOf={{md['geonet:info'].id}}"
               title="{{'createChild' | translate}}">
              <i class="fa fa-sitemap text-muted"></i>
            </a>
            <a class="btn btn-default"
               data-ng-class="user.canEditRecord(md) ? '' : 'btn-single'"
               data-ng-show="md.isTemplate != 's'"
               data-ng-href="#/create?from={{md['geonet:info'].id}}"
               title="{{'duplicate' | translate}}">
              <i class="fa fa-copy text-muted"></i>
            </a>
          </div>
        </div>
      </div>
    </td>
  </tr>
</table>
